# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
# Contributor: Simon Lipp <sloonz+aur@gmail.com>

pkgname=fop
pkgver=1.1
pkgrel=1
pkgdesc='XSL-FO implementation in Java.'
arch=('any')
url='http://xmlgraphics.apache.org/fop/'
license=('APACHE')
depends=('java-xmlgraphics-commons' 'java-commons-logging' 'java-commons-io' 'java-batik'
         'java-avalon-framework')
makedepends=('apache-ant' 'java-environment')
source=("http://ftp-stud.hs-esslingen.de/pub/Mirrors/ftp.apache.org/dist/xmlgraphics/$pkgname/source/$pkgname-$pkgver-src.tar.gz"
        'fop.conf')
md5sums=('7b63af514b28c06fe710a794cbf4d68e'
         '3dc3325bf77afc787024f33e7d6ab99e')
backup=('etc/fop.conf')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  ant package 
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  install -Dm0644 "build/fop.jar" "$pkgdir/usr/share/java/fop/fop.jar"
  install -Dm0644 "../fop.conf" "$pkgdir/etc/fop.conf"
  install -Dm0755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
}
